﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="WebBanThuoc.Login" %>

<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
    <script type="text/javascript">
        function CheckRegisterFormEmail(e) {
            var strEmail = $(e).val();

            regem = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
            return regem.test(strEmail)

        }
        //------------------------------------ validate form
        function CheckLoginForm() {
            var email = '<%=tb_email.ClientID%>';
            var pass = '<%=tb_matkhau.ClientID%>';

            if ($.trim($('#' + email).val()) == "") {
                alert("Bạn chưa nhập Email." + $('#' + email).val());
                $('#' + email).focus();
                return false;
            }
            else {
                   if (CheckRegisterFormEmail($('#' + email))) {
                    return true;
                } else {
                    alert("Email không hợp lệ.");
                    return false;
                }

            }

        }
    </script>
<div class="tran_nav">
     <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px; display:inline;">
          <a href="TrangChu.aspx" itemprop="url" >
            <span itemprop="title">Trang chủ</span>
          </a> 
        </div>  <font>&raquo;</font>
        <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px;  display:inline;">
                <span itemprop="title">Đăng nhập</span>
         </div>
 </div> 
  <div class="middle_content_cart" style="font-size:14px; margin:5px; width:404px; height:204px; margin-left:90px;padding:2px" >
    <div  class="shopping_cart" style="padding:5px; width:392px; height:192px">
    
    <table cellpadding="5px" cellspacing="5px" style="width:360px; margin-left:60px; margin-top:10px; vertical-align:top" >
    <tr> <td align="left">Email</td></tr>
    <tr><td  align="left">
           <asp:TextBox ID="tb_email" runat="server" MaxLength="100"
                CssClass="tbox" AutoCompleteType="Disabled">
         </asp:TextBox></td>
    </tr>
    <tr><td align="left">Mật khẩu</td></tr>
    <tr><td  align="left"><asp:TextBox ID="tb_matkhau" runat="server" TextMode="Password" MaxLength="50"  
            CssClass="tbox"></asp:TextBox></td>
    </tr>
   <!-- <tr><td><asp:CheckBox ID="remember" runat="server" Text="Nhớ thông tin đăng nhập" 
            style="float:left; font-size: small; padding:5px"           
            oncheckedchanged="remember_CheckedChanged" /></td>
    </tr> -->
   </table>
              
        <p><asp:Button ID="bt_dangnhap" name="bt_dangnhap" Text="Đăng nhập" 
            runat="server"  CssClass=" cart_button_send" style="margin-top:10px; margin-bottom:10px; float:left; margin-left:65px"
            Width="77px" Height="33px" onclientclick='return CheckLoginForm();'
            onclick="bt_dangnhap_Click" /> 
             <a href="Register.aspx" id="link_reg">Bạn chưa có tài khoản?</a>
            </p><br />
            <div style="float:left; margin-left:40px;margin-top:10px;; width:360px">
              <asp:Label ID="label1" runat="server" CssClass="l_info" ></asp:Label> 
            </div>
      
     </div>
    

 </div>
 <style>
     #link_reg{font-size:14px; color:#8DC50A; text-decoration:none; float:left; margin-top:20px; margin-bottom:10px; margin-left:38px}
     #link_reg:hover{color:Black;}
 </style>
</asp:Content>
